package Class.Advance.MethodReference.Practise;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class ArrayStructureReference {
    public static void main(String[] args) {
        List<Integer> numList = new ArrayList<Integer>();
        Collections.addAll(numList, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
        Integer[] numArray = numList.stream().toArray(Integer[]::new);
        for (Integer num : numArray) {
            System.out.print(num + " ");
        }
    }
}
